<template>
  <a-drawer title="论文基本信息" wrapClassName="fullscreen" height="100%" placement="bottom" :closable="false" @close="handleCancel" :visible="visible">
    <a-card class="card" :bordered="false">
      <div style="width: 87%;">
        <!-- <detail-list :col="2">
          <detail-list-item term="学号">{{ itemList.xh }}&nbsp;</detail-list-item>
          <detail-list-item term="姓名">{{ itemList.xm }}&nbsp;</detail-list-item>
        </detail-list> -->
        <a-form >
          <a-form-item
            label="基本信息"
            :labelCol="{span: 3,offset: 1}"
            :wrapperCol="{span: 19, offset: 1}">
            <detail-list :col="2">
              <detail-list-item term="学号">{{ itemList.xh }}&nbsp;</detail-list-item>
              <detail-list-item term="姓名">{{ itemList.xm }}&nbsp;</detail-list-item>
            </detail-list>
          </a-form-item>
          <a-form-item
            label="论文题目"
            :labelCol="{span: 3,offset: 1}"
            :wrapperCol="{span: 19, offset: 1}">
            <a-textarea maxlength="35" disabled v-model="dataList.lwtm"/>
          </a-form-item>
          <a-form-item
            label="论文题目英文"
            :labelCol="{span: 3,offset: 1}"
            :wrapperCol="{span: 19, offset: 1}">
            <a-textarea disabled v-model="dataList.lwywtm"/>
          </a-form-item>
          <a-form-item
            label="论文关键词"
            :labelCol="{span: 3,offset: 1}"
            :wrapperCol="{span: 19, offset: 1}">
            <a-textarea disabled v-model="dataList.lwgjc"/>
          </a-form-item>
          <a-form-item
            label="论文摘要"
            :labelCol="{span: 3,offset: 1}"
            :wrapperCol="{span: 19, offset: 1}">
            <a-textarea disabled v-model="dataList.lwzynr"/>
          </a-form-item>
          <a-row>
            <a-col :md="12" :sm="24">
              <a-form-item
                label="论文起始年月"
                :labelCol="{span: 8,offset: 1}"
                :wrapperCol="{span: 14, offset: 1}"
              >
              <a-month-picker disabled v-model="dataList.lwqsrq"/>
              </a-form-item>
            </a-col>
            <a-col :md="12" :sm="24">
              <a-form-item
                label="论文结束年月"
                :labelCol="{span: 8,offset: 1}"
                :wrapperCol="{span: 14, offset: 1}"
              >
              <a-month-picker disabled  v-model="dataList.lwzzrq"/>
              </a-form-item>
            </a-col>
            <a-col :md="12" :sm="24">
              <a-form-item
                label="论文类型"
                :labelCol="{span: 8,offset: 1}"
                :wrapperCol="{span: 14, offset: 1}"
              >
              <a-input disabled :allowClear="true" showSearch optionFilterProp="children" v-model="dataList.lwlxmc" />
              <!-- <a-select disabled :allowClear="true" showSearch optionFilterProp="children" v-model="dataList.lwlxm">
                  <a-select-option v-for="i in TYPE0425" :key="i.id" :value="i.code" >{{ i.name }}</a-select-option>
                </a-select> -->
              </a-form-item>
            </a-col>
            <a-col :md="12" :sm="24">
              <a-form-item
              label="论文选题来源"
                :labelCol="{span: 8,offset: 1}"
                :wrapperCol="{span: 14, offset: 1}"
              >
              <a-input disabled :allowClear="true" showSearch optionFilterProp="children" v-model="dataList.lwxtlymc" />
              <!-- <a-select disabled :allowClear="true" showSearch optionFilterProp="children" v-model="dataList.lwxtlym">
                  <a-select-option v-for="i in TYPE0071" :key="i.id" :value="i.code">{{ i.name }}</a-select-option>
                </a-select> -->
              </a-form-item>
            </a-col>
            <a-col :md="12" :sm="24">
              <a-form-item
                label="论文密级"
                :labelCol="{span: 8,offset: 1}"
                :wrapperCol="{span: 14, offset: 1}"
              >
              <a-input disabled :allowClear="true" showSearch optionFilterProp="children" v-model="dataList.lwmjmmc" />
              </a-form-item>
            </a-col>
            <a-col :md="12" :sm="24">
              <a-form-item
                label="论文字数（万）"
                :labelCol="{span: 8,offset: 1}"
                :wrapperCol="{span: 14, offset: 1}"
              >
              <a-input-number disabled :min="0" :max="100" style="width: 100%" v-model="dataList.lwzs"/>
              </a-form-item>
            </a-col>
          </a-row>
          <a-form-item
            label="研究方向"
            :labelCol="{span: 3,offset: 1}"
            :wrapperCol="{span: 19, offset: 1}">
            <a-textarea disabled v-model="dataList.yjfx"/>
          </a-form-item>
      
        </a-form>
      </div>
    </a-card>
    <div class="drawer-bootom-button" style="z-index:1">
      <div style="float:right">
        <a-button type="primary" @click="handleCancel">关闭窗口</a-button>
      </div>
    </div>
  </a-drawer>
</template>
<script>
import { mapState } from 'vuex'
import DetailList from '~/tool/DetailList'
const DetailListItem = DetailList.Item
export default {
  props: {
    visible: {
      default: false
    },
    itemList: {
      default: {}
    }
  },
  components: {
    DetailList,DetailListItem
  },
  
  computed: {
   
  },
  watch: {
    visible() {
       this.init()
    }
  },
  data() {
    return {
      dataList: {}
    }
  },
  created() {
   
  },
  methods: {
    init(){
      this.$get(`degree/xwlwxx/info/${this.itemList.id}`,{}).then((res) => {
          this.dataList = res.data
      })
    },
    handleCancel(){
        this.$emit('close')
    }
   
  }
}

</script>
<style lang="less">
.fullscreen {
  .ant-drawer-wrapper-body {
    height: 100%;
    overflow: auto;
  }
}

</style>
